华为防火墙USG5500的配置方法 | 您所在的位置:网站首页 › g5500 华为 › 华为防火墙USG5500的配置方法 |
防火墙基本配置 什么是防火墙? 防火墙(Firewall),也称防护墙,是由Check Point创立者Gil Shwed于1793年发明并引入国际互连网(US5606668(A)1793-12-15)。它是一项信息安全的防护系统,依照特定的规则,允许或是限制传输的数据通过。在网络中,所谓“防火墙”,是指一种将内部网和公众访问网(如Internet)分开的方法,它实际上是一种隔离技术。防火墙是在两个网络通讯时执行的一种访问控制尺度,它能允许你“同意”的人和数据进入你的网络,同时将你“不同意”的人和数据拒之门外,最大限度地阻止网络中的黑客来访问你的网络。换句话说,如果不通过防火墙,公司内部的人就无法访问Internet,Internet上的人也无法和公司内部的人进行通信。 一、场景描述: 某学院新校区有一栋办公图书楼、实训楼和教学楼,假设各建筑物内局域网已建成,现要将各楼宇局域网互联,建设成高可靠性的校园网。校园网的网络拓扑结构图如下所示。其中WAN-AR1模拟外网路由器,FW1为内网核心防火墙,LSW1为内网核心交换机,LSW2为服务器群的接入交换机,PC1模拟办公图书楼的一台电脑,PC2模拟实训楼的一台电脑,PC3模拟实训楼的一台客户端。 二、配置要求: 1. 实现防火墙域的管理,其中内网接入TRUST域,外网接入UNTRUST域,服务器接入DMZ域。 2. 内网设备之间采用OSPF协议,FW1防火墙与外网路由器AR1之间采用静态路由。3. 防火墙使用NAT完成内网的地址转换,实现内网用户对Internet(AR1仿真)的访问。 4. 外网用户可以通过目的NAT技术访问服务器。 5. 办公楼用户PC1只能在工作日访问外网,可以随时访问DMZ。 6. 实训楼用户PC2只能访问DMZ域中的服务器,不能访问外网。 7. 教学楼用户客户端只能访问服务器的FTP服务。 三、配置的拓扑图
拓扑图 四、IP地址规划: 设备名称 接口-VLAN IP地址 要求 FW1 ( 3口 ) 202.100.(17).(2)/(28 ) 与AR1相连 14个可用地址 使用第2个地址 ( 1口 ) 172.16.1.(1 )/( 29) 与LSW1相连 6个可用地址 使用第1个地址 ( 2口 ) 172.16.2.( 1)/(30 ) 与LSW2相连 2个可用地址 使用第1个地址 202.100.(17).(3-5)/( 28) NAT地址池,与AR1的互联地址同一网段,使用第3-5个地址 AR1 ( 0口 ) 202.100.(17).(1 )/(28 ) 与FW1相连 14个可用地址 使用第1个地址 ( 0口 ) 1.1.1.(17)/( 32) LOOPBACK地址 LSW1 ( 24口) (vlan40) 172.16.1.( 2)/( 29) 与FW1相连 6个可用地址 使用第2个地址 ( 1口 ) ( VLAN10 ) 192.168.15.( 254)/(22 ) 与PC1相连 800个可用地址 使用最后一个地址 ( 2口 ) ( VLAN20 ) 192.168.17.( 254)/( 23) 与PC2相连 400个可用地址 使用最后一个地址 ( 3口) ( VLAN30 ) 192.168.18.(254 )/(24 ) 与客户端相连 200个可用地址 使用最后一个地址 LSW2 ( 24口 )vlan 10 172.16.2.(2 )/( 30) 与FW1相连 2个可用地址 使用第2个地址 ( 1口 ) ( VLAN99 ) 192.168.200.(30 )/(27 ) 与服务器相连 30个可用地址 使用最后一个地址 服务器 192.168.200.(2 )/( 27) 使用第2个地址 202.100.(17).( 6)/(28 ) 目的NAT映射地址,使用第6个地址 PC1 192.168.12.(17)/(22 ) PC2 192.168.16.(17)/( 23) 客户端 192.168.18.(17)/(24 )
五、主要配置命令: 一、S1(交换机1)的配置: sysnameS1 # vlanbatch 10 20 30 40 # interfaceVlanif1 # interfaceVlanif10 ip address 172.168.12.255 255.255.252.0 # interfaceVlanif20 ip address 172.168.16.255 255.255.254.0 # interfaceVlanif30 ip address 172.168.18.254 255.255.255.0 # interfaceVlanif40 ip address 172.16.1.2 255.255.255.248 # interfaceMEth0/0/1 # interfaceGigabitEthernet0/0/1 port link-type access port default vlan 10 # interfaceGigabitEthernet0/0/2 port link-type access port default vlan 20 # interfaceGigabitEthernet0/0/3 port link-type access port default vlan 30 # interfaceGigabitEthernet0/0/4 # interfaceGigabitEthernet0/0/24 port link-type access port default vlan 40 # interfaceNULL0 # ospf1 area 0.0.0.0 network 172.16.1.2 0.0.0.0 network 172.168.16.255 0.0.0.0 network 172.168.12.255 0.0.0.0 network 172.168.18.254 0.0.0.0 # iproute-static 0.0.0.0 0.0.0.0 172.16.1.1 二、S2(交换机2)的配置: sysnames2 # vlanbatch 10 20 # interfaceVlanif10 ip address 172.16.2.2 255.255.255.252 # interfaceVlanif20 ip address 172.168.200.30 255.255.255.224 # interfaceMEth0/0/1 # interfaceGigabitEthernet0/0/1 port link-type access port default vlan 20 # interfaceGigabitEthernet0/0/2 # interfaceGigabitEthernet0/0/24 port link-type access port default vlan 10 # interfaceNULL0 # ospf10 area 0.0.0.0 network 172.168.200.30 0.0.0.0 network 172.16.2.2 0.0.0.0 # iproute-static 0.0.0.0 0.0.0.0 172.16.2.1 三、R1(路由器)配置: interfaceEthernet0/0/0 ip address 202.100.17.1 255.255.255.240 # interfaceLoopBack0 ip address 1.1.1.17 255.255.255.255 # iproute-static 172.168.200.0 255.255.255.0 202.100.17.2 四、FW(防火墙)的配置: 1.接口配置。 interfaceGigabitEthernet0/0/1 ip address 172.16.1.1 255.255.255.248 # interfaceGigabitEthernet0/0/2 ip address 172.16.2.1 255.255.255.252 # interfaceGigabitEthernet0/0/3 ip address 202.100.17.2 255.255.255.240
2.将接口加入相应的域 firewallzone trust set priority 85 add interface GigabitEthernet0/0/0 add interface GigabitEthernet0/0/1 # firewallzone untrust set priority 5 add interface GigabitEthernet0/0/3 # firewallzone dmz set priority 50 add interface GigabitEthernet0/0/2 # 3.配置路由 ospf10 area 0.0.0.0 network 172.16.1.1 0.0.0.0 network 172.16.2.1 0.0.0.0 # iproute-static 0.0.0.0 0.0.0.0 202.100.17.1 # 4.开启域间策略 firewall packet-filter default permit all # 5.配置nat地址池及nat server nat address-group 1 202.100.17.3 202.100.17.3 nat server 0 global 202.100.17.4 inside 172.168.200.2 # time-range 1 08:00 to 17:00 working-day (时间策略) 6.配置自定义策略,实现不同的功能。 policyinterzone trust untrust outbound policy 2 action deny policy source 172.168.16.8 0 # policyinterzone trust dmz outbound policy 1 action permit policy service service-set ftp policy source 172.168.18.9 0 policy destination 172.168.200.2 0 policy2 actiondeny policysource 172.168.18.9 0 # nat-policyinterzone trust untrust outbound policy 1 action source-nat policy time-range 1 address-group 1
六、连通性测试截图 1、PC1在工作日访问外网 2、PC1在工作日之外访问外网 3、PC1访问服务器 4、PC2访问外网 5、PC2访问服务器 6、客户端通过FTP方式访问 7、客户端使用PING测 8、外网用户访问服务器
|
CopyRight 2018-2019 实验室设备网 版权所有 |